//
//  ViewController.m
//  YiLiao
//
//  Created by Infinite on 16/7/1.
//  Copyright © 2016年 Infinite. All rights reserved.
//

#import "ViewController.h"
#import "LoginViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    dispatch_queue_t queue = dispatch_queue_create("jiazai", DISPATCH_QUEUE_CONCURRENT);
    dispatch_sync(queue, ^{
        
        UIImageView * lodingImage = [[UIImageView alloc]initWithFrame:self.view.frame];
        lodingImage.image=[UIImage imageNamed:@"1"];
        [self.view addSubview:lodingImage];
        
        
        
        [UIView animateWithDuration:3 animations:^{
            
        } completion:^(BOOL finished) {
            LoginViewController * loginVC =[[LoginViewController alloc]init];
            [UIApplication sharedApplication].delegate.window.
            rootViewController = loginVC;
            
            [UIImageView animateWithDuration:2 animations:^{
                
                [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:[UIApplication sharedApplication].keyWindow cache:YES];
            }];
        }];

    });
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
